<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>测试Thymeleaf内置对象</title>
</head>
<body>

<hr>
<!--<h2 th:text="${curDate}">当前时间</h2>-->

<h2 th:text="${#dates.format(curDate,'yyyy-MM-dd HH:mm:ss')}">当前时间</h2>


<hr>
<!--<span th:text="${money}"></span>-->
<!--表示保留2位小数位，整数位自动-->
<span th:text="${#numbers.formatDecimal(money,0,2)}"></span>
<!--表示保留2位小数位，整数位3位，不够味数前补0-->
<span th:text="${#numbers.formatDecimal(money,3,2)}"></span>
<!--获取集合长度-->
<span th:text="${#lists.size(datas)}"></span>
<!--  localhost:8032/bookController/testThymeleafTools?userName=admin   -->
<span th:text="${#httpServletRequest.getParameter('userName')}"></span>

<!--List集合遍历-->
<div th:each="dateTime: ${#dates.listFormat(listDate,'yyyy-MM-dd')}" >
    <div th:text="${dataTime}"></div>
</div>



</body>
</html>